ass Solution:
    def maxSumOfThreeSubarrays(self, nums: List[int], k: int) -> List[int]:
        curr_best1, curr_best2, curr_best3 = nums[0: k], nums[: k * 2], nums[k * 2: k * 3]
        si1 = [0]
        si2 = [0, k]
        si3 = [0,k, k*2]
        s1 =sum(curr_best1)
        s2 = sum(curr_best2)
        s3 = sum(curr_best3)
        max_s1 = sum(curr_best1)
        max_s2 = sum(curr_best1) + sum(curr_best2)
        max_s3 = sum(curr_best1) + sum(curr_best2) + sum(curr_best3)
        for i in range(1, len(nums) - 3*k + 1):
            s1 = s1 + nums[i + k - 1] - nums[i - 1]
            s2 = s2 + nums[i + k*2 - 1] - nums[i + k - 1]
            s3 = s3 + nums[i + k*3 - 1] - nums[i + k*2 - 1]
            print(si1, si2, si3)

            if s1 > max_s1:
                max_s1 = s1
                si1 = [i]
            if s2 + max_s1 > max_s2:
                max_s2 = s2 + max_s1
                si2 = si1 + [i + k]
            if s3 + max_s2 > max_s3:
                max_s3 = s3 + max_s2
                si3 = si2 + [i + k* 2]
        return si3
